\usepackage{lmodern}

%%%%%
%%
%% This file sets up the Sign and Label datatypes and creates Sign and
%% Label macros.
%%
%% Signs generally represent interesting parts of game area, usually
%% as things posted on walls.  Labels represent other things, often on
%% or inside envelopes, that are part of complex mechanics.
%%
%% The default value for \MYloc will inherit location from the Place
%% or Sign most immediately up the ownership tree.  Override this by
%% setting \MYloc to anything (even blank).
%%
%% Sign is for full-sized signs that would cover most of a large
%% manila envelope; SignMedium is for signs sized to half-sized manila
%% envelopes; SignSmall is for signs sized for small manila envelopes
%% (the same size as item cards).  Label, LabelMedium, and LabelSmall
%% are analagous, but they don't have a \takedownby note at the
%% bottom.  You can always use a sign or label without an envelope or
%% with a differently-sized envelope.  Choose which based on
%% visibility and content.
%%
%% SignTiny is for signs you want to be hard to find; it is small and
%% does not have a \takedownby note.  SignDot is for a very small
%% "dot" which only has a title.
%%
%% SignStrip produces a strip of paper (without a \takedownby note)
%% with labels on the outside that show on both sides if you fold it
%% in half.  These are a convenient alternative to sub-envelopes. They
%% can also be used for "s-packets" taped to walls (see
%% Extras/README-s-packets).
%%
%% LabelCover produces a label similar to the cover to a research
%% notebook.  LabelPage, likewise, produces a page.
%%
%% EOG is for full-sized end-of-game signs.
%%
%%%%%

\DECLARESUBTYPE{Sign}{Element}
\PRESETS{Sign}{
  \FD\MYloc	{\mylocation} %% real-space location
  \FD\MYtext	{} %% text of sign
  }
\POSTSETS{Sign}{
  \edef\mylocation{\MYloc}
  \protected@edef\@ownerstring{%
    \MYname%
    \ifx\mylocation\empty\else\ (\mylocation)\fi%
    }
  }
\def\mylocation{}

\def\loc#1{\rs\MYloc{#1}}

\DECLARESUBTYPE{SignMedium}{Sign}
\DECLARESUBTYPE{SignSmall}{Sign}
\DECLARESUBTYPE{SignTiny}{Sign}
\DECLARESUBTYPE{SignDot}{Sign}
\PRESETS{SignDot}{\s\MYtext{}}

\DECLARESUBTYPE{Label}{Sign}
\PRESETS{Label}{}
\DECLARESUBTYPE{LabelMedium}{Label}
\DECLARESUBTYPE{LabelSmall}{Label}

\DECLARESUBTYPE{SignStrip}{Sign}
\DECLARESUBTYPE{LabelCover}{Label}
\DECLARESUBTYPE{LabelPage}{Label}

\DECLARESUBTYPE{EOG}{Sign}
\PRESETS{EOG}{%
  \s\MYname	{End Of Game}
  \s\MYtext	{{\bf\Huge You may not pass through here.}}
  }


%%%%%
%% \signbig[<location>]{<name>}{<text>}
%% \eog[<location>]
%%
%% \signmdeium[<location>]{<name>}{<text>}
%% \signsmall[<location>]{<name>}{<text>}
%% \signtiny[<location>]{<name>}{<text>}
%% \signdot[<location>]{<name>}
%%
%% \labelbig{<name>}{<text>}
%% \labelmedium{<name>}{<text>}
%% \labelsmall{<name>}{<text>}
%%
%% \signstrip[<location>]{<name>}{<text>}
%% \labelcover{<name>}{<text>}
%% \labelpage{<name>}{<text>}
\newinstance{Sign}{\signbig[3][\mylocation]}{
  \s\MYloc{#1}\s\MYname{#2}\s\MYtext{#3}}
\newinstance{EOG}{\eog[1][\mylocation]}{\s\MYloc{#1}}

\newinstance{SignMedium}{\signmedium[3][\mylocation]}{
  \s\MYloc{#1}\s\MYname{#2}\s\MYtext{#3}}
\newinstance{SignSmall}{\signsmall[3][\mylocation]}{
  \s\MYloc{#1}\s\MYname{#2}\s\MYtext{#3}}
\newinstance{SignTiny}{\signtiny[3][\mylocation]}{
  \s\MYloc{#1}\s\MYname{#2}\s\MYtext{#3}}
\newinstance{SignDot}{\signdot[2][\mylocation]}{
  \s\MYloc{#1}\s\MYname{#2}}

\newinstance{Label}{\labelbig[2]}{
  \s\MYname{#1}\s\MYtext{#2}}
\newinstance{LabelMedium}{\labelmedium[2]}{
  \s\MYname{#1}\s\MYtext{#2}}
\newinstance{LabelSmall}{\labelsmall[2]}{
  \s\MYname{#1}\s\MYtext{#2}}

\newinstance{SignStrip}{\signstrip[3][\mylocation]}{
  \s\MYloc{#1}\s\MYname{#2}\s\MYtext{#3}}
\newinstance{LabelCover}{\labelcover[2]}{
  \s\MYname{#1}\s\MYtext{#2}}
\newinstance{LabelPage}{\labelpage[2]}{
  \s\MYname{#1}\s\MYtext{#2}}


%%%%%
%% \sEOG{}
%% use \sEOg[\loc{<location>}]{} for EOG sign at a specific place
\NEW{EOG}{\sEOG}{
  }


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\NEW{Sign}{\slookAround}{
  \s\MYname{Writing on the wall}
  \s\MYtext{{\fontsize{120}{144} \normalfont Look Around You}}
  }

\NEW{Sign}{\swalkabout}{
  \s\MYname{Writing on the wall}
  \s\MYtext{{\fontsize{120}{144} \normalfont You never know where an odd walk will take you.}}
  }

\NEW{Sign}{\sintroSign}{
  \s\MYname{Dark Hallways}
  \s\MYtext{At the bottom of the pit, you see a dark stone hallway stretches onwards before you. The walls are spotted with prison cells, though there is no sign of life inside them. You can hear the screeching of rats off in the distance.}
  }

\NEW{Sign}{\scorpse}{
  \s\MYname{Skeleton}
  \s\MYtext{The bones of another who braved these dungeons before you.}
  }

\NEW{Sign}{\scollapsedroom}{
  \s\MYname{Wreckage}
  
  \s\MYtext{The room is filled with collapsed stone. You should watch your step to avoid setting off another avalanche.}
  }

\NEW{Sign}{\sguardhouse}{
  \s\MYname{Guard House}
  
  \s\MYtext{A wall and pit that would once have separated prisoners from what lies beyond. A small guardhouse on the far side seems to have a mechanism for deactivating the wall. The ground on the pit and beyond glows with a strange blue light.}
  }

\NEW{Sign}{\sfloorthreetoone}{
  \s\MYname{Stairs}
  
  \s\MYtext{You may take these stairs to the first floor}
  }

\NEW{Sign}{\sflooronetothree}{
  \s\MYname{Stairs}
  
  \s\MYtext{You may take these stairs to the third floor}
  }

\NEW{Sign}{\sgemeye}{
  \s\MYname{Statue}
  
  \s\MYtext{You see a stone lion statue. One of its eyes is a blue gem. The other socket is empty. Inscribed below is ``I can see the way''.
  
  If you want to interact with the statue, contact a GM.}
  }

\NEW{Sign}{\spalace}{
  \s\MYname{The Palace}
  
  \s\MYtext{After descending for what seems like an eternity, you exit the stairs to find another corridor. Things are different here. The walls are made of gold and marble, and tattered banners hang from the ceiling. It would look almost inviting were it not for the layers of dust that coat everything and eerie silence that surrounds you.}
  }

\NEW{Sign}{\spalaceexit}{
  \s\MYname{Stairs}
  
  \s\MYtext{Behind this door you see stairs descending deeper into the mountain. Unfortunately, the door appears to be locked. There is a key hole, but you're going to need a key.

  If you have a key (item number \ikey{\MYnumber}) you may take these stairs to the basement.}
  }

\NEW{Sign}{\srubysign}{
  \s\MYname{Safe}
  
  \s\MYtext{A small alcove in the wall, blocked by steel bars. In the back you can see a small ruby glittering.}
  }

\NEW{Sign}{\ssudoku}{
  \s\MYname{Mysterious symbols}
  
  \s\MYtext{
  \begin{tabular}{||c|c|c||c|c|c||c|c|c||}
  \hline
  \hline
  5& &2& &8&1& &9& \\
  \hline
   & &9& & &7&8&2&4\\
  \hline
  8& &4&9& &6& & &7\\
  \hline
  \hline
   &2&8&7& & & &4&1\\
  \hline
  7&4& &6&?& &5& &8\\
   \hline
   & &5&1&4&8& & &6\\
  \hline
  \hline
   & & &5&6&9&7&1& \\
  \hline
  9&1& & &7& &4&8& \\
  \hline
  2&5&7& &1& &3& & \\
  \hline
  \hline
  \end{tabular}
  }
  }

\NEW{Sign}{\sexplosion}{
  \s\MYname{Bomb}
  
  \s\MYtext{Upon looking into this box, something explodes. Each PC takes 2 fire damage.}
  }
  
\NEW{Sign}{\sBoxA}{
  \s\MYname{Box}
  
  \s\MYtext{ A box with a large 1 written on it. To open it, look at the sign behind this one. }
  }
\NEW{Sign}{\sBoxB}{
  \s\MYname{Box}
  
  \s\MYtext{ A box with a large 2 written on it. To open it, look at the sign behind this one. }
  }
\NEW{Sign}{\sBoxC}{
  \s\MYname{Box}
  
  \s\MYtext{ A box with a large 3 written on it. To open it, look at the sign behind this one. }
  }
\NEW{Sign}{\sBoxD}{
  \s\MYname{Box}
  
  \s\MYtext{ A box with a large 4 written on it. To open it, look at the sign behind this one. }
  }
\NEW{Sign}{\sBoxE}{
  \s\MYname{Box}
  
  \s\MYtext{ A box with a large 5 written on it. To open it, look at the sign behind this one. }
  }
\NEW{Sign}{\sBoxF}{
  \s\MYname{Box}
  
  \s\MYtext{ A box with a large 6 written on it. To open it, look at the sign behind this one. }
  }
\NEW{Sign}{\sBoxG}{
  \s\MYname{Box}
  
  \s\MYtext{ A box with a large 7 written on it. To open it, look at the sign behind this one. }
  }
\NEW{Sign}{\sBoxH}{
  \s\MYname{Box}
  
  \s\MYtext{ A box with a large 8 written on it. To open it, look at the sign behind this one. }
  }
\NEW{Sign}{\sBoxI}{
  \s\MYname{Box}
  
  \s\MYtext{ A box with a large 9 written on it. To open it, look at the sign behind this one. }
  }
\NEW{Sign}{\sFoundScroll}{
  \s\MYname{Contents}
  
  \s\MYtext{You find a scroll inside the box.}
  }

\NEW{Sign}{\sarchives}{
  \s\MYname{The Archives}
  
  \s\MYtext{You come across the palace archives. The room is filled with row after row of bookshelves. Unfortunately, most of the books have decayed beyond readability by this point.}
  }

\NEW{Sign}{\sThroneRoom}{
  \s\MYname{Throne Room}
  
  \s\MYtext{You see what once must have been a majestic throne room. The high ceiling and glorious spires draw your attention to the skeleton sitting on the throne with a small golden key about his neck. Unfortunately, a heavy metal gate and several incongruous pits block your path to the throne.}
  }

\NEW{Sign}{\sKitchen}{
  \s\MYname{Kitchens}
  
  \s\MYtext{Probably the kitchens from long ago. The food in the stores has long ago decayed into nothing.}
  }

\NEW{Sign}{\sArmory}{
  \s\MYname{Armory}
  
  \s\MYtext{The old armory. The walls are cluttered with weapons and armor. A pair of heavily armed statues watch the doors ominously.}
  }

\NEW{Sign}{\sBarracks}{
  \s\MYname{The Barracks}
  
  \s\MYtext{Rows of bunks line the walls. You would think that they are long abandoned, but the skeletons of three of the former inhabitants patrol the room. You see a large ruby trapped in one the the skeletons' chest cavity. Some strange defensive fixture continues to spin in the center of the room.}
  }

\NEW{Sign}{\sTreasury}{
  \s\MYname{Treasury}
  
  \s\MYtext{The room is full of gold. Surprising perhaps that the door is unlocked. At least until you note the clockwork archer in the center of the room and the tripwires along the edges. And the corpse in the corner.

  On further observation, the archer seems to be without eyes. There must be something going on here.}
  }

\NEW{Sign}{\sTarget}{
  \s\MYname{Weak spot}
  
  \s\MYtext{A portion of wall with small, but noticeable cracks in it.}
  }
\NEW{Sign}{\sVaras}{
  \s\MYname{A corpse}
  
  \s\MYtext{Now only bones. Several large arrows protrude from its chest. It seems to still be clutching a sack full of gold coins.}
  }

\NEW{Sign}{\sDungeons}{
  \s\MYname{Dungeons}
  
  \s\MYtext{This room appears to be the entrance to a dungeon. Heavily barred gates block the way into a long corridor filled with small cells.}
  }

\NEW{Sign}{\sSpawnPoint}{
  \s\MYname{Gate}
  
  \s\MYtext{A barred gate. Looking beyond, you can see motion. Looks like some of the guards are not as dead as they should be.}
  }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Floor 1

\NEW{Sign}{\sfirstexit}{
  \s\MYname{Stairs}
  \s\MYtext{Behind this door you see stairs descending deeper into the mountain. Unfortunately, the door appears to be locked. There is a key hole, but you're going to need a key.

  If you have a key (item number \ikey{\MYnumber}) you may take these stairs to the basement.}
  }

  \NEW{Sign}{\sSpiderDen}{
  \s\MYname{Spider Nest}
  \s\MYtext{An unlocked iron gate.  Behind the the gate you can see large egg sacks covering the floor.  As you approach, the spiders' chittering grows louder.}
  }

  \NEW{Sign}{\sCorpse}{
  \s\MYname{Skeleton}
  \s\MYtext{The bones of another who braved these dungeons before you.}
  }

    \NEW{Sign}{\sEggSack}{
  \s\MYname{Egg Sack}
  \s\MYtext{A giant leathery blob filled with eggs.  The sack is attached to the floor with thick webs. }
  }


    \NEW{Sign}{\sRatDen}{
  \s\MYname{Rat Den}
  \s\MYtext{An iron gate stands between you and a horde of giant rats.}
  }

      \NEW{Sign}{\sLaser}{
  \s\MYname{Cell}
  \s\MYtext{Inside, a statue stands watch over a single cell.  A small red light illuminates a section of the wall.}
  }


  % Floor 3

        \NEW{Sign}{\sLavaRoom}{
  \s\MYname{Bridge}
  \s\MYtext{This cave is entirely filled with lava.  A small bridge spans the gap between the two exits.}
  }

          \NEW{Sign}{\sLava}{
  \s\MYname{Lava}
  \s\MYtext{A pool of lava.}
  }

\NEW{Sign}{\sBridge}{
  \s\MYname{Bridge}
  \s\MYtext{A precarious wooden bridge.  The supports are starting to rot and looks like a bit more damage to the bridge would cause it to collapse.}
  }

\NEW{Sign}{\sTorture}{
  \s\MYname{Torture Chamber}
  \s\MYtext{A viewport in the door reveals a  room with large whirring machines.  None of them look comfortable to be near.}
}

\NEW{Sign}{\sCrushingWall}{
  \s\MYname{Crushing Wall Trap}
  \s\MYtext{It appears that the walls on the hallway can push together to crush unsuspecting victims.  The walls are currently closed and the machinery to operate the trap is damaged.  It appears to be missing a gear.}
}

\NEW{Sign}{\sCrushingWallFixed}{
  \s\MYname{Crushing Wall Trap}
  \s\MYtext{It appears that the walls on the hallway can push together to crush unsuspecting victims.}
}

\NEW{Sign}{\sCrushingWallOpen}{
  \s\MYname{Crushing Wall Trap}
  \s\MYtext{It appears that the walls on the hallway can push together to crush unsuspecting victims.  The walls are currently open and the machinery to operate the trap is damaged.  It appears to be missing a gear.}
}

\NEW{SignMedium}{\sLever}{
  \s\MYname{Lever}
  \s\MYtext{A lever.  If you activate it, tell a GM.}
}

\NEW{SignMedium}{\sButton}{
  \s\MYname{Button}
  \s\MYtext{A button.  If you activate it, tell a GM.}
}

\NEW{Sign}{\sForge}{
  \s\MYname{Forge}
  \s\MYtext{A river of lava runs through this room.  You can see anvils and hammers lining the walls on both sides.  A glowing blue light covers most of the floor on the far side.}
}

\NEW{Sign}{\sSmash}{
  \s\MYname{Forge}
  \s\MYtext{The floor here is cracked and broken, as though hit by something very heavy.}
}

\NEW{Sign}{\sBoss}{
  \s\MYname{Ritual Chamber}
  \s\MYtext{Cryptic runes cover this ornate door.  The door is locked and needs a key.}
}

\NEW{Sign}{\sBossUnlocked}{
  \s\MYname{Ritual Chamber}
  \s\MYtext{Cryptic runes cover this ornate door.}
}

\NEW{Sign}{\sWorshipRoom}{
  \s\MYname{Worship Room}
  \s\MYtext{This chapel is filled with rows of pews.  In the back, a large idol is placed to loom over the congregation.}
}

\NEW{Sign}{\sMainHall}{
  \s\MYname{Main Hall}
  \s\MYtext{A massive hall with a vaulted ceiling.  A throne stands at one end.}
}